﻿#ifndef __SS_ELEMENT_H__
#define __SS_ELEMENT_H__
#include "../ss3dDefine.h"

namespace StarSeeker
{

class ssNode;
class ssComponent
{
	friend class ssNode;
public:
	enum ComponentType_e
	{
		SS_COMPONENT_TRANSFORM = 0,	//变换
		SS_COMPONENT_MESH = 1,		//网格
		SS_COMPONENT_MATERIAL = 2,	//材质
		SS_COMPONENT_RENDER = 3,
		SS_COMPONENT_CAMERA = 4,
		SS_COMPONENT_LIGHT = 5,
		SS_COMPONENT_MAX			//自定义组件
	};

	ssComponent();
	virtual ~ssComponent();

	ssNode* GetNode();

protected:
	//组件类型
	u32 GetType();
	//组件被挂载到结点
	virtual void OnAdd();
	//组件被删除
	virtual void OnDelete();

protected:
	u32				m_type;		//组件类型
	ssNode*			m_pNode;	//所在节点
public:
	bool			m_enable;
};

}
#endif
